
#include "OgreOctreePlugin.h"
#include "OgreRoot.h"

namespace Ogre 
{
	const String sPluginName = "Octree Scene Manager";
	//---------------------------------------------------------------------
	OctreePlugin::OctreePlugin()
		:mOctreeSMFactory(0)
	{

	}
	//---------------------------------------------------------------------
	const String& OctreePlugin::getName() const
	{
		return sPluginName;
	}
	//---------------------------------------------------------------------
	void OctreePlugin::install()
	{
		// Create objects
		mOctreeSMFactory = PHILO_NEW OctreeSceneManagerFactory();

	}
	//---------------------------------------------------------------------
	void OctreePlugin::initialise()
	{
		// Register
		Root::getSingleton().addSceneManagerFactory(mOctreeSMFactory);
	}
	//---------------------------------------------------------------------
	void OctreePlugin::shutdown()
	{
		// Unregister
		Root::getSingleton().removeSceneManagerFactory(mOctreeSMFactory);
	}
	//---------------------------------------------------------------------
	void OctreePlugin::uninstall()
	{
		// destroy 
		PHILO_DELETE mOctreeSMFactory;
		mOctreeSMFactory = 0;


	}


}
